package com.myapp.Activity;


import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.myapp.R;
import com.myapp.View.SimpleToolbar;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;


/**
 * author : YuFeng
 * e-mail : 923462992@qq.com
 * date   : 2019/8/1411:00
 * desc   :
 */
public class UserInfoActivity extends BaseActivity {
    private static final String TAG = "UserInfoActivity";

//    private String name;

    @BindView(R.id.toolbar_userInfo)
    SimpleToolbar toolbarUserInfo;
    @BindView(R.id.tv_user_telephone)
    TextView tvUserTelephone;
    @BindView(R.id.cc_user_info)
    ConstraintLayout ccUserInfo;
    @BindView(R.id.cc_user_change_password)
    ConstraintLayout ccUserChangePassword;
    @BindView(R.id.cc_user_back)
    LinearLayout ccUserBack;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_user_info_layout);
        ButterKnife.bind(this);
//        name = PreferencesUtil.getInstance(getApplicationContext()).getString(LOGIN_NAME,null);
//        if (name!=null){
//            tvUserTelephone.setText(name);
//        } else {
//            tvUserTelephone.setText(" ");
//        }
         toolbarUserInfo.setLeftIconClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
                 finish();
             }
         });
    }

    @Override
    protected void onResume() {
        super.onResume();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }

    @OnClick({R.id.cc_user_change_password, R.id.cc_user_back})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.cc_user_change_password:
                Intent intent = new Intent(this,ChangePasswordActivity.class);
                startActivity(intent);
                break;
            case R.id.cc_user_back:
                Log.i(TAG, "onViewClicked: "+"点击到");
                Intent intent1 = new Intent(this,LoginActivity.class);
                startActivity(intent1);
                break;
        }
    }
}

